package com.google.android.gcm.demo.server;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@SuppressWarnings("serial")
public class RemoveAllServlet extends BaseServlet {

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		List<String> devices = Datastore.getDevices();
		for (String device : devices) {
			Datastore.unregister(device);
		}
        setSuccess(resp);
	}


}
